Hệ thống bổ nhiệm bác sĩ trong PHP bằng mã nguồn

1 <?php if(!isset($_SESSION)){
2     session_start();
3     }
4 ?>
5 <?php include(
'header.php'); ?>
6 <?php include(
'uptomenu.php'); ?>
7
8     <div
class="search form-group" style="background-color: #7faf81;">
9         <h3
class="text-center" style="background-color:#272327;color: #fff;padding: 5px;">Search result</h3>
10         
11     </div>
12 <!-- result -->
13
14                     <!--
for retriving data -->
15                 <?php
16                             include(
'../config.php');
17                             $sql=
"SELECT * FROM doctor where address='" . $_POST["address"] . "' AND expertise='" . $_POST["expertise"] . "'";
18             
19                             $q=mysqli_query($conn,$sql);
20                             $row=mysqli_num_rows($q);
21                             
22                             $data=mysqli_fetch_array($q);
23                             $name=$data[
2];
24                             $address=$data[
3];
25                             $contact=$data[
4];
26                             $email=$data[
5];
27                             $userid=$data[
9];
28                             $expertise=$data[
6];
29                             $fee=$data[
8];
30                             $pic = $data[
11];
31
32                             mysqli_close($conn);
33                 ?>
34 <!--
for retriving data -->
35 <?php
36     
if ($row>=1) { ?>
37         
38     
39 <div
class="login" style="background-color:#fff;">
40         
41             <div
class="formstyle" style="float: right;padding:20px;border: 1px solid lightgrey;margin-right:415px; margin-bottom:30px;background-color:#f3f3f8;color:#141313;">
42                 <form action=
"" method="post" class="text-center form-group">
43                     <img src=
"../photo/<?php echo @$pic; ?>" style="padding-left:40px;width:165px;height:115px;float: left;margin-bottom:10px;margin-left:35px;"/>
44                     <label>
45                          <input type=
"hidden" name="pic" value="<?php {echo @$pic;} ?>">
46                     </label><br><br>
47
48                     <label>
49                         Dr. Name: <input type=
"text" name="name" value="<?php echo $name; ?>" required>
50                     </label><br><br>
51
52                     <label>
53                         Address: <input type=
"text" name="address" value="<?php echo $address; ?>" required>
54                     </label><br><br>
55
56                     
57                     <label>
58                         Contact: <input type=
"text" name="contact" value="<?php echo $contact; ?>" required="required" />
59                     </label><br><br>
60                     <label>
61                         Email: <input type=
"email" name="email" value="<?php echo $email; ?>" " required>
62                     </label><br><br>
63                     
64                     <label>
65                         Expert
in: <input type="email" name="email" value="<?php echo $expertise; ?>" disabled>
66                     </label><br><br>
67
68                     <label>
69                         Fee: <input type="
text" name="fee" value="<?php echo $fee; ?>" disabled>
70                     </label><br><br>
71                     <label>
72
73                     
74             </form> <br><br>
75
76     </div>
77     
78     
79 </div>
80                 <?php
81                         
while($row=mysqli_fetch_array($q)){
82                                 echo "
<tr>";
83                                 echo "
<td>".$row['name']."</td>";
84                                 echo "
<td>".$row['address']."</td>";
85                                 
86                                 echo "
<td>".$row['contact']."</td>";
87                                 echo "
<td>".$row['email']."</td>";
88
89                                 echo "
<td>".$row['expertise']."</td>";
90                                 echo "
<td>".$row['fee']."</td>";
91                                 
92                                 
93                                 
94                                 echo "
</tr>";
95                         }
96
97                 }
else{
98                     echo "
NO match Found!";
99                 }
100
101 ?>
102     <button style="
margin-left: 605px;background-color:#332f30;color: antiquewhite;width: 115px;height: 30px;margin-bottom: 5px;">
103     <a href="
search_doctor.php">Search Again</a></button>
104     
105  <?php include('footer.php'); ?>
106
107
108     
109     </div><!-- containerFluid Ends -->
110
111
112
113
114     <script src="
js/bootstrap.min.js"></script>
115
116
117  
118
119
120     
121 </body>
122 </html>


Gõ tìm kiếm nhanh...